package com.knowswift.issues.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.knowswift.common.bean.issue.po.IssueNew;
import com.knowswift.common.bean.issue.vo.IssueVO;
import com.knowswift.common.bean.project.vo.ModuleVO;
import com.knowswift.common.common.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface IssueNewMapper extends BaseMapper<IssueNew> {
    Page<IssueVO> getRecords(
                             @Param("moduleName") String moduleName,
                             @Param("projectName") String projectName,
                             @Param("issueArea") String issueArea,
                             @Param("issueCode") String issueCode,
                             @Param("issueStatus") Integer issueStatus,
                             Page<IssueVO> page);

    Page<IssueVO> getRecordsInAdmin(@Param("userId") String userId,
                                    @Param("moduleName") String moduleName,
                                    @Param("projectName") String projectName,
                                    @Param("issueArea") String issueArea,
                                    @Param("issueCode") String issueCode,
                                    @Param("issueStatus") Integer issueStatus,
                                    @Param("projects") List<String> projects,
                                    Page<IssueVO> page);


    List<ModuleVO> getRecordModules(@Param("userId") String userId);

    Page<IssueVO> getRecordsByModule(@Param("moduleName") String moduleName,
                                     @Param("projectName") String projectName,
                                     @Param("projects") List<String> moduleProjects,
                                     @Param("deviceId") String deviceId,
                                     Page<IssueVO> page);
}
